package com.atguigu.springcloud.service;

import com.atguigu.springcloud.service.impl.OrderServiceExceptionHandler;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "CLOUD-PAYMENT-HYSTRIX-SERVICE",fallback = OrderServiceExceptionHandler.class )
@Component
public interface OrderService {

    @GetMapping("/payment/hystrix/ok/{id}")
    String getOK(@PathVariable("id") Integer id);


    @GetMapping("/payment/hystrix/fail/{id}")
     String getFail(@PathVariable("id") Integer id);


}